<?php
//we include the needed files
include ("configs/config_log.php");

//if the user is not logged then -> redirect to login page
if ( $_SESSION['LOGIN_NAME'] <> "admin" ) 
	{

	header("Location: login-admin.php");
	exit();
	}
if(isset($empty))
	{
	//we reset all counters
		$query_delete="delete from incoming_links";
		$request_url=mysql_query($query_delete);
		$query_delete="delete from redirected_links";
		$request_url=mysql_query($query_delete);
		$query_delete="delete from url_address";
		$request_url=mysql_query($query_delete);
	}
	

$tpl = new XTemplate("./template/tpl_admin.html");


$tpl->parse("main.body.default");
$tpl->parse("main.body.menu");
//$tpl->parse("main.body.links_by_url");
$tpl->parse("main.body");

$tpl->parse("main");
$tpl->out("main");

?>
